﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo1
{
    class Class4
    {
        string StudentA;
        string StudentB;
        string StudentC;
        string StudentD;
        static string teacherA = "唐僧";

        public string A
        {
            get { return this.StudentA; }
            set { this.StudentA = value; }
        }
        public string B
        {
            get { return this.StudentB; }
            set { this.StudentB = value; }
        }
        public string C
        {
            get { return this.StudentC; }
            set { this.StudentC = value; }
        }
        public string D
        {
            get { return this.StudentD; }
            set { this.StudentD = value; }
        }
        public void Test()
        {
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.A, teacherA);
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.B, teacherA);
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.C, teacherA);
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.D, teacherA);
            Test1();
            Console.WriteLine("--------------------------------------------------------------");
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.A, teacherA);
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.B, teacherA);
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.C, teacherA);
            Console.WriteLine("我的名字是{0}，俺老师叫{1}", this.C, teacherA);
        }
        void Test1()
        {
            teacherA = "嫦娥";
        }
    }
}
